<?php
namespace app\common\validate;
use think\Validate;
class Seller extends Validate
{
    protected $rule    = [
        'name' => 'require|unique:seller,name',
        'phone' => 'require|unique:seller,phone|mobile',
        'company_id' => 'require',
    ];
    protected $message = [
        'name.require' => '请输入名称',
        'name.unique' => '该名称已存在',
        'phone.require' => '手机号码不能为空',
        'phone.mobile' => '手机号码格式错误',
        'company_id.require' => '所属公司编号必填',
    ];
}
